package cn.itsource.common;

import cn.itsource.util.AjaxResult;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;

/*
*
* 插入缓存的数据
* */
@FeignClient(value = "COMMON-SERVICE",fallbackFactory = RedisFallBackFactory.class)
public interface RedisClient {


    /*
    * 存储缓存数据
    * */
    @PostMapping("/redis")
    public AjaxResult set(@RequestParam("key") String key, @RequestParam("value")String value);

    /*
    * 获取缓存数据
    * */
    @GetMapping("/redis")
    public AjaxResult get(@RequestParam("key")String key);

    
}
